package pt.ipleiria.plp.threads;

import pt.ipleiria.plp.BlackSpotterMidlet;
import pt.ipleiria.plp.Lixeiras.Lixeira;

/**
 * Thread For obtaining the data from a lixeira sent
 */
public class DeleteLixeiraFromServer extends Thread {

    private String guid;
    private BlackSpotterMidlet midlet;
    private boolean enviada;
    CallbackConfirm screen;

    public DeleteLixeiraFromServer(String guid, boolean enviada,
            BlackSpotterMidlet midlet,CallbackConfirm screen) {
        this.guid = guid;
        this.midlet = midlet;
        this.enviada = enviada;
        this.screen = screen;
    }

    public void run() {

        String error = midlet.getApp().getManager().deleteLixeira(guid, enviada);
        screen.returnConfimation(error);
    }
}
